package com.hsjk.szwj.module.pay.util;

import com.hsjk.szwj.module.pay.dal.dataobject.config.AbstractResp;

/**
 * @author chenjiawei
 * @desc api响应结果构造器
 * @Date 2023/08/27 23:56
 **/
public class ApiResBuilder {
    /**
     * 构建自定义响应对象, 默认响应成功
     **/
    public static <T extends AbstractResp> T buildSuccess(Class<? extends AbstractResp> T) {

        try {
            T result = (T) T.newInstance();
            return result;

        } catch (Exception e) {
            return null;
        }
    }
}
